package com.amayadream.webchat.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import com.amayadream.webchat.pojo.ChatRecord;

@Service(value = "chatRecordDao")
public interface IChatRecordDao {
	List<ChatRecord> selectByFromid(@Param("fromid") String fromid, @Param("offset") int offset, @Param("limit") int limit);
	
    List<ChatRecord> selectByToid(@Param("toid") String toid, @Param("offset") int offset, @Param("limit") int limit);
    
    boolean insert(ChatRecord chatrecord);
    
    ChatRecord selectCountByFromid(@Param("fromid") String fromid);
    
    ChatRecord selectCountByToid(@Param("toid") String toid);
}
